package com.kakarote.admin.entity.PO;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 * 飞书工作台订单表
 * </p>
 *
 * @author xuepengfei
 * @since 2022-11-10
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@TableName("wk_admin_fly_order")
@ApiModel(value = "AdminCpOrder对象", description = "飞书工作台订单")
public class AdminFlyOrder implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("主键ID")
    @JsonSerialize(using = ToStringSerializer.class)
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    @ApiModelProperty("订单id")
    private String orderId;

    @ApiModelProperty("付费方案ID")
    private String pricePlanId;

    @ApiModelProperty("用户购买方案类型 trial -试用；permanent-免费；per_year-企业年付费；per_month-企业月付费；per_seat_per_year-按人按年付费；per_seat_per_month-按人按月付费；permanent_count-按次付费")
    private String pricePlanType;


     

    @ApiModelProperty("表示购买了多少人份")
    private Integer seats;

    @ApiModelProperty("套餐购买数量 目前都为1")
    private Integer buyCount;

    @ApiModelProperty("订单创建时间")
    private LocalDateTime createTime;

    @ApiModelProperty("付款时间")
    private LocalDateTime payTime;

    @ApiModelProperty("订单当前状态，normal -正常；refund-已退款")
    private String status;

    @ApiModelProperty("购买类型 buy普通购买 upgrade为升级购买 renew为续费购买")
    private String buyType;

    @ApiModelProperty("订单支付价格")
    private BigDecimal orderPayPrice;

}
